package stu.aistar.day02.params;

/**
 * 方法的参数
 */
public class ParamMethodDemo {
    public static void main(String[] args) {
        // add('a',"name");

        //此处的18和tom就是实参
        //add(18,"tom");

        sub(10,20,30,40,50);
    }
    //此处的age和name就是形参
    public static void add(int age,String name){
        System.out.println(age+":"+name);
    }

    //可变长列表
    public static void sub(int... arr){
        for (int i = 0;i<arr.length;i++) {
            System.out.println(arr[i]);
        }
    }
}
